﻿namespace TS2015.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("TbTinh")]
    public partial class TbTinh
    {
        public TbTinh()
        {
            TbHuyens = new HashSet<TbHuyen>();
            TbTruongs = new HashSet<TbTruong>();
        }

        [Key]
        [Display(Name = "Mã Tỉnh/TP")]
        public int MaTinh { get; set; }

        [Required(ErrorMessage = "Bạn chưa nhập Tỉnh/TP!")]
        [Display(Name = "Tỉnh/TP")]
        [StringLength(50)]
        public string TenTinh { get; set; }

        public ICollection<TbHuyen> TbHuyens { get; set; }

        public ICollection<TbTruong> TbTruongs { get; set; }
    }
}
